package spring.cloud.canary.demo.controller;

import jk.framework.canary.core.CanaryMgt;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cuichao
 */
@RestController
@RequestMapping("provider")
public class ProviderController {


    @GetMapping("ping")
    public String ping(){
        return "ping";
    }

    @GetMapping("canary")
    public String canary(){
       return CanaryMgt.getController().localCurrentVersion().getVersion();
    }
}
